﻿@model IEnumerable<FantasyBlog.DAL.Post>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_CPLayout.cshtml";
}


<h2>所有文章</h2>

<div id="wpbody">

<div id="wpbody-content">
<div id="screen-meta">

	<div id="contextual-help-wrap" class="hidden">
	    <div class="metabox-prefs">
            <p>帮助内容：</p>
        </div>
	</div>

    <div id="screen-meta-links">
        <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
            <a href="#contextual-help" id="contextual-help-link" class="show-settings">帮助</a>
        </div>
    </div>

</div>

<div class="wrap">
<div id="icon-edit" class="icon32 icon32-posts-post"><br /></div>
<h2>文章 <a href="adminPost/CreatePost" class="add-new-h2">写文章</a> </h2>

<!--
<ul class='subsubsub'>
	<li class='all'><a href='' class="current">全部    <span class="count">(1)</span></a> |</li>
	<li class='publish'><a href=''>已发布                 <span class="count">(1)</span></a> |</li>
	<li class='trash'><a href=''>回收站                    <span class="count">(3)</span></a>  </li>
</ul>
-->

<form id="posts-filter" action="" method="get">

<!--
<p class="search-box">
	<label class="screen-reader-text" for="post-search-input">搜索文章:</label>
	<input type="text" id="post-search-input" name="s" value="" />
	<input type="submit" name="" id="search-submit" class="button" value="搜索文章"  />
</p>
-->

<table class="wp-list-table widefat fixed posts" cellspacing="0">
	<thead>
	<tr>
		<th scope='col' id='cb' class='manage-column column-cb check-column'  style="">
        </th>
        <th scope='col' id='title' class='manage-column column-title sortable desc'  style="">
            <span>标题</span>
        </th>
        <th scope='col' id='author' class='manage-column column-author sortable desc'  style="">
            <span>作者</span>
        </th>
        <th scope='col' id='categories' class='manage-column column-categories'  style="">分类目录</th>
        <th scope='col' id='tags' class='manage-column column-tags'  style="">标签</th>
        <th scope='col' id='comments' class='manage-column column-comments num sortable desc'  style="">
                <span>
                    <span class="vers">
                        <img alt="评论" title='评论' src="@Url.Content("~/Content/images/comment-grey-bubble.png")" />
                    </span>
                </span>
                </th>
                    <th scope='col' id='date' class='manage-column column-date sortable asc'  style="">
                        <span>日期</span>
                    </th>	
                </tr>
	</thead>

	<tfoot>
	    <tr>
		    <th scope='col'  class='manage-column column-cb check-column'  style="">
            </th>
            <th scope='col'  class='manage-column column-title sortable desc'  style="">
                <span>标题</span>
            </th>
            <th scope='col'  class='manage-column column-author sortable desc'  style="">
                    <span>作者</span>
             </th>
             <th scope='col'  class='manage-column column-categories'  style="">分类目录</th>
             <th scope='col'  class='manage-column column-tags'  style="">标签</th>
             <th scope='col'  class='manage-column column-comments num sortable desc'  style="">
                    <span>
                        <span class="vers">
                            <img alt="评论" title='评论' src="@Url.Content("~/Content/images/comment-grey-bubble.png")" />
                        </span>
                    </span>
                    <span class="sorting-indicator"></span>
             </th>
             <th scope='col'  class='manage-column column-date sortable asc'  style="">
                    <span>日期</span>
             </th>	
        </tr>
	</tfoot>

	<tbody id="the-list">
        @foreach (var item in Model)
        {
        <tr id='post-6' class='alternate author-self status-publish format-default iedit' valign="top">
			<th scope="row" class="check-column">
            </th>
			<td class="post-title page-title column-title">
                <strong><a class="row-title" href="/adminpost/editPost/@Html.DisplayFor(modelitem => item.ID)" title="编辑“@Html.DisplayFor(modelitem => item.title)”">@Html.DisplayFor(modelitem => item.title)</a></strong>
                <div class="row-actions">
                    <span class='edit'><a href="/adminpost/editPost/@Html.DisplayFor(modelitem => item.ID)" title="编辑此项目">编辑</a> | </span>
                    <span class='trash'><a title="删除文章" onclick="return confirm('你确定要将此项目删除吗?');" href="/adminpost/delete/@Html.DisplayFor(modelitem => item.ID)" > 删除文章</a> | </span>
                    <span class='view'><a href="/adminpost/editPost/@Html.DisplayFor(modelitem => item.ID)" title="查看“@Html.DisplayFor(modelitem => item.title)”" rel="permalink">查看</a></span>
                </div>
            </td>			
            <td class="author column-author">
                <a >@Html.DisplayFor(modelitem => item.PostUser.username)</a>
            </td>
			<td class="categories column-categories">
                <a href="">@Html.DisplayFor(modelitem => item.Category.name)</a>
            </td>
			<td class="tags column-tags">无标签</td>
			<td class="comments column-comments">
                <div class="post-com-count-wrapper">
			        <a href='' title='@Html.DisplayFor(modelitem => item.comment_status)' class='post-com-count'>
                        <span class='comment-count'>@Html.DisplayFor(modelitem => item.comment_count)</span>
                    </a>			
                </div>
            </td>
			<td class="date column-date">
                    <abbr title="@Html.DisplayFor(modelitem => item.date)">@Html.DisplayFor(modelitem => item.date)</abbr>
                    <br />@Html.DisplayFor(modelitem => item.status)
            </td>		
        </tr>
        }
    </tbody>
</table>
</form>


</div>


